IRelationship.Relate method

Namespace: NextDesign.Core

Description

Replaces the related end of this relationship with the specified model. This method does not check path constraints or multiplicity constraints.

argument

Name Type Description
source IModel Model of association source side

null cannot be specified.
target IModel Model of the associated destination

null cannot be specified.
sourceIndex int New relation source position
Specify the index with the start position as 0.

The destination model is an additional position in the field that references the origin.
If an index out of the number of elements of the corresponding field on the related side is specified, it is added to the end.
targetIndex int New target position
Specify the index where 0 is the start position.

The source model will be the additional position in the field that refers to the destination.
If an index out of the number of elements of the corresponding field on the relation source side is specified, it is added to the end.

Return value

  • void

Exception

Name Exception Class Description
Invalid argument ExtensionArgumentException When null is specified for source or target
Specified model invalid ExtensionInvalidTypeException When a value that cannot be set for the specified relation end is specified.
-The type of the specified model and the model type of the new relation end are not compatible
Illegal operation ExtensionInvalidOperationException When the model itself is a deleted model or temporary proxy
If an unoperable relationship is specified for this relationship
-Product line feature assignment related
-System.Core tag Granted relations
-Owned relations
Invalid model specified ExtensionInvalidModelException If the deleted model or temporary proxy is specified in the relation source side and relation source destination model